
//ajax删除
function deletes(url,model,id){
    if(id==''){
        layer.msg('请选择数据！'); return false;
    }
    layer.confirm('确定删除吗？', {
        btn: ['确定', '取消']
    },function(){
        $.post(url,{id:id,model:model},function (df) {
            if(df.code==200){
                layer.msg(df.msg,{time:1000});
                setTimeout(function () {
                    window.location.reload();
                },1000);
            }else{
                layer.msg(df.msg,{time:1000});
            }
        })
    });

}



//日期封装
function date_time(selet,type){
    if(type==1){
        $(selet).datetimepicker({
            format: 'yyyy-mm-dd hh:ii:ss',
            language:"zh-CN",
            minView:2,
            autoclose:true
        });
    }else if(type==2){
        $(selet).datetimepicker({
            format: 'yyyy-mm-dd',
            language:"zh-CN",
            minView:2,
            autoclose:true
        });
    }

}


